package cz.possoft.converter.jaxb;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;

import cz.possoft.serializable.generic.Game;

/**
 * This converter is used to serialize games into XML elements and deserialize games back from JAXB to normal form. Converter should be implemented for 
 * each game. 
 * 
 * @author mposolda
 */
public interface JAXBGameConverter<T extends Game> {

	public JAXBElement<?> convertGameToJAXBElement(T game);
	
	public T convertJAXBElementToGame(JAXBElement<?> element);
	
	// should be implemented for each game.
	public JAXBContext getJAXBContext();
}
